package com.listeningframework.boot.autoconfigure.webmvc.validate;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import javax.validation.Constraint;
import javax.validation.Payload;

/**
 * Validate Annotation For Not Blank
 * 
 * @author lixining
 * @version $Id: ListeningNotBlank.java, v 0.1 2016年5月5日 下午4:13:22 lixining Exp $
 */
@Constraint(validatedBy = ListeningNotBlankValidator.class)
@Target({ ElementType.FIELD })
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface ListeningNotBlank {
    /**
     * <p>
     * message、groups、payload must be defined when define
     * custom validation annotation
     * </p>
     *
     * @return String
     */
    String message() default "{listening.invalid.notblank}";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
